﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp26
{
    class Program
    {
        static void Main(string[] args)
        {
            SortedList sortlist = new SortedList();
            sortlist.Add(1, "阴霾");
            sortlist.Add(2, "晴空");
            sortlist.Add(3, "婵娟");
            sortlist.Add(4, "残缺");
            Console.WriteLine("不知阴晴圆缺:");
            int id = int.Parse(Console.ReadLine());
            bool moment = sortlist.ContainsKey(id);
            if (moment)
            {
                string weather = sortlist[id].ToString();
                Console.WriteLine("询问天气变化:{0}", weather);
            }
            else
            {
                Console.WriteLine("无法预料");
            }
            Console.WriteLine("变化多端:");
            foreach (DictionaryEntry u in sortlist)
            {
                int key = (int)u.Key;
                string value = u.Value.ToString();
                Console.WriteLine("且盼:{0},且望:{1}", key, value);
            }
        }
    }
}
